﻿using System;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Windows;
using System.Threading;
using DocumentsTagger;

namespace DocumentsTaggerUI
{
    /// <summary>
    /// Interaction logic for App.xaml
    /// </summary>
    public partial class App : Application
    {
        private Thread m_TaggerThread;
        private Tagger m_Tagger = new Tagger();
        private void Application_Startup(object sender, StartupEventArgs e)
        {
            m_TaggerThread = new Thread(new ThreadStart(m_Tagger.StartTagging));
            m_TaggerThread.Name = "TaggingThread";
            m_TaggerThread.Start();

        }

        private void Application_Exit(object sender, ExitEventArgs e)
        {
            m_Tagger.StopTagging();
            m_TaggerThread.Join();

        }
    }
}
